using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace QLKS.HeThongDAO
{
    public class TK_DAO
    {
        public static DataTable SelectAllDSPhong()
        {
            string sql = "SELECT MaPhong FROM Phong";
            return Config.AccessHelper.ExecuteQuery(sql);
        }

        public static DataTable thongke(string maphong, string dk1, string dk2)
        {
            string sql = "SELECT * FROM CTThuePhong,HoaDon where CTThuePhong.MaPhong = '" + maphong + "' And CTThuePhong.MaHoaDon = HoaDon.MaHoaDon " + dk1 + " " + dk2 + "";
            return Config.AccessHelper.ExecuteQuery(sql);
        }

        //public int Tinhngay(DateTime d1 ,DateTime d2)
        //{
        //    string sql = "SELECT DateDiff(d,'"+d1+"','"+d2+"') FROM Phong";
        //    return Config.AccessHelper.ExecuteQuery(sql);
        //}
    }
}
